package cn.mazexal.examapi.dataware;

import cn.mazexal.examapi.models.db.StatisticDO;
import cn.mazexal.examapi.models.db.UserCollectDO;

import cn.mazexal.examapi.models.qry.UserCollectQry;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
*  用户收藏 Mapper
*
*/
@Mapper
public interface UserCollectMapper extends BaseMapper<UserCollectDO> {


    int deleteUserCollect(@Param("id") Long id);

    int getUserCollectCount(@Param("qry") UserCollectQry qry);

    List<UserCollectDO> getUserCollectList(@Param("qry")UserCollectQry qry);

    List<StatisticDO> getUserStatistic(@Param("examBankId") Long examBankId,@Param("userId") long userId);

    UserCollectDO getExamQuestionById(@Param("examBankId") Long examBankId,@Param("questionId") Long questionId,@Param("userId") Long userId);

    List<StatisticDO> getUserCollectStatistic(@Param("questionIds") List<Long> questionIds,@Param("userId") Long userId,@Param("examBankId") Long examBankId);
}